<?php

/**
 * This is the model metadata class for table "refund_bill".
 */
class RefundBillMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'refund_bill';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('status, merchant_type', 'numerical', 'integerOnly'=>true),
			array('order_id, user_id, worker_id, merchant_id', 'length', 'max'=>20),
			array('user_name, worker_name, merchant_name', 'length', 'max'=>64),
			array('money, order_commission', 'length', 'max'=>10),
			array('provider_name', 'length', 'max'=>32),
			array('refund_time, confirm_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('refund_id, order_id, user_id, user_name, money, refund_time, status, confirm_time, worker_id, worker_name, provider_name, merchant_id, merchant_name, merchant_type, order_commission', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'refund_id' => '退款单Id, 主键, 自增长',
			'order_id' => '外键, 引用order表的主键order_id',
			'user_id' => '外键, 引用用户表user的主键user_id',
			'user_name' => '退款人名称',
			'money' => '退款金额',
			'refund_time' => '退款时间',
			'status' => '退款状态',
			'confirm_time' => '确认时间',
			'worker_id' => '外键, 引用管理人员表worker的主键worker_id',
			'worker_name' => '确认人名称',
			'provider_name' => '支付聚道名称',
			'merchant_id' => '商家Id',
			'merchant_name' => '商家名称',
			'merchant_type' => '商家类型. 1:供应商, 2:代理商',
			'order_commission' => '订单佣金金额',
		);
	}
}